package com.example.designpatterns.strategy;

/**
 * 环境类
 */
public class Context {
    private Strategy1 strategy1;
    public Context(){
    }
    public Context(Strategy1 strategy1){
        this.strategy1 = strategy1;
    }

    public void setStrategy1(Strategy1 strategy1) {
        this.strategy1 = strategy1;
    }
    public int discounts(int money){
        return this.strategy1.discounts(money);
    }
}
